#ifndef __IR_H__
#define __IR_H__

#include "sys.h"
#include "stm32f1xx_hal.h"

#define IR_CH1 HAL_GPIO_ReadPin(IR_CH1_GPIO_Port, IR_CH1_Pin)
#define IR_CH2 HAL_GPIO_ReadPin(IR_CH2_GPIO_Port, IR_CH2_Pin)
#define IR_CH3 HAL_GPIO_ReadPin(IR_CH3_GPIO_Port, IR_CH3_Pin)
#define IR_CH4 HAL_GPIO_ReadPin(IR_CH4_GPIO_Port, IR_CH4_Pin)

#define BLACK GPIO_PIN_SET
#define WHITE GPIO_PIN_RESET

#define IR_Turn_LESSER  20
#define IR_Turn_GREATER 30

#define IR_Forward  40
#define IR_Stop     0

typedef struct IR_Struct
{
    float Forward, Turn;
}IRS;


#endif
